package com.cmwa.scbp.sys.permission.operRole.dao;

import java.util.HashMap;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.cmwa.scbp.base.annotation.MybatisDao;
import com.cmwa.scbp.base.mvc.dao.BaseDao;
import com.cmwa.scbp.base.mvc.entity.SearchParam;
import com.cmwa.scbp.base.exception.RepositoryException;
import com.cmwa.scbp.sys.permission.operRole.entity.OperRoleVo;

@MybatisDao
public interface OperRoleDao extends BaseDao<OperRoleVo> {

	/**
	 *角色列表
	 * @param param
	 * @return
	 */
	List<OperRoleVo> roleListPage(SearchParam param);

	/**
	 * 保存
	 * @param roleVo
	 */
	void saveRole(OperRoleVo roleVo) throws RepositoryException;

	/**
	 * 通过角色名称获取数量
	 * @param roleName
	 * @param roleId 
	 * @return
	 */
	int getCountByRoleName(HashMap<String,Object> param);

	/**
	 * 根据角色ID获取角色详情
	 * @param roleId
	 * @return
	 */
	OperRoleVo queryRoleById(String roleId);

	/**
	 * 获取全部角色
	 * @return
	 */
	List<OperRoleVo> roleList(@Param(value="roleName") String roleName);
}
